// utils/logger.go
package utils

import (
	"fyne.io/fyne/v2"

	"fyne.io/fyne/v2/widget"
)

func ShowError(err error) {
	w := fyne.CurrentApp().NewWindow("错误")
	content := widget.NewLabel(err.Error())
	w.SetContent(content)
	w.Resize(fyne.NewSize(300, 100))
	w.Show()
}

func ShowInfo(msg string) {
	w := fyne.CurrentApp().NewWindow("信息")
	content := widget.NewLabel(msg)
	w.SetContent(content)
	w.Resize(fyne.NewSize(300, 100))
	w.Show()
}
